package com.itmuch.contentcenter.controller.content;

import com.itmuch.contentcenter.domain.dto.content.ShareDto;
import com.itmuch.contentcenter.service.content.ShareService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author caiqian
 * @date 2021/5/7 11:01
 */
@RestController
@RequestMapping("shares")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ShareController {

  private final ShareService shareService;

  @GetMapping("/{id}")
  public ShareDto findById(@PathVariable Integer id){
    return shareService.findById(id);
  }

}
